<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <div id="app">
        <p v-for="(item,index) in items" :key="index">
            <span>数组项：{{item}} 下标：{{index}}</span>
        </p>
        <p v-for="(obj,index) in obj" :key="index">
            <span>值：{{obj}} 键：{{index}}</span>
        </p>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14"></script>
    <script>
        new Vue({
            el:'#app',
            data:{
                items:["a","b","c"],
                obj:{
                    key1:'val1',
                    key2:'val2',
                }
            }
        })
    </script>
</body>
</html>